<?
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("database");
mysql_query("SET NAMES UTF8");

$strSQL = "INSERT INTO doctor (dr_name,dr_sex,clinic_name,clinic_major,clinic_add,clinic_tambon,clinic_amphur,clinic_town,clinic_post,clinic_tel,dr_edu,dr_specail,dr_pre,dr_pic,dr_lat,dr_lon) VALUES ('".$_POST["dr_name"]."','".$_POST["dr_sex"]."','".$_POST["clinic_name"]."','".$_POST["clinic_major"]."','".$_POST["clinic_add"]."','".$_POST["tambon_id"]."','".$_POST["amphur_id"]."','".$_POST["town_id"]."','".$_POST["clinic_post"]."','".$_POST["clinic_tel"]."','".$_POST["clinic_edu"]."','".$_POST["clinic_special"]."','".$_POST["dr_pre"]."','".$_FILES["filUpload"]["name"]."','".$_POST["dr_lat"]."','".$_POST["dr_lon"]."')";

$objQuery = mysql_query($strSQL);
mysql_query("SET NAMES UTF8");

if($objQuery)
{
	 echo "<meta http-equiv='Content-Type'   charset='UTF-8' />";	
 	 echo '<script language="javascript" type="text/javascript"> alert("บันทึกข้อมูลแล้วค่ะ  ขอขอบคุณที่ร่วมเป็นส่วนหนึ่งกับเว็บไซต์ของเรา"); window.location.href="C-Dr-member.php"; </script>';
 }
else
{
echo "Error Save [".$strSQL."]";
}

mysql_close($objConnect);
?>

 
	 <?
	if(copy($_FILES["filUpload"]["tmp_name"],"myfile/".$_FILES["filUpload"]["name"]))
	{
 	}
?>

